<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link href="bootstrap/bootstrap-3.3.7-dist/css/bootstrap.min.css" />
<style type="text/css">
body{
padding-top: 40px;
  padding-bottom: 40px;
}
#login_body {
margin-top:20px;
margin-bottom:20px;
  background-color: #eee;
}

.form-signin {
  max-width: 330px;
  padding: 15px;
  margin: 0 auto;
}
.form-signin .form-signin-heading,
.form-signin .checkbox {
  margin-bottom: 10px;
}
.form-signin .checkbox {
  font-weight: normal;
}
.form-signin .form-control {
  position: relative;
  height: auto;
  -webkit-box-sizing: border-box;
     -moz-box-sizing: border-box;
          box-sizing: border-box;
  padding: 10px;
  font-size: 16px;
}
.form-signin .form-control:focus {
  z-index: 2;
}
.form-signin input[type="email"] {
  margin-bottom: -1px;
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}
.form-signin input[type="password"] {
  margin-bottom: 10px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
</style>
</head>
<body>
	<br />
	<br />
	<br />
	<div class="container" id="login_body">
		<form class="form-signin">
			<h2 class="form-signin-heading">请登录</h2>
			<label for="inputUserName" class="sr-only">用户名</label> 
			<input type="text" id="username" class="form-control" placeholder="username" required autofocus /> 
			<label for="inputPassword" class="sr-only">密码</label> 
			<input type="password" id="password" class="form-control" placeholder="Password" required autofocus/>
			<div class="checkbox">
			<label> 
				<input type="checkbox" value="remember-me" />
					记住密码
				</label>
			</div>
			<button class="btn btn-lg btn-primary btn-block" type="button" id="submit">登录</button>
		</form>
	</div>
	<!-- /container -->

</body>
<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
<script type="text/javascript"
	src="bootstrap/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/public/public.js"></script>
<script type="text/javascript">
$(function() {
	
	$("#submit").click(function() {
		var url="user/login.action"
		var username = $("#username").val();
		var password = $("#password").val();
		var args = {
				"username":username ,
				"password":password
		}
		$.post(url,args,function(data) {
			if(data == 0) {
				changeCenterGet("/SSM/login.html");
			} else if(data == 1) {
				window.location.href="index.jsp";
			}
		});
	});
})
</script>
</html>